package com.leetone.microserver.controller;

import com.leetone.microserver.po.Order;
import com.leetone.microserver.util.ServiceInfoUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @GetMapping("/order/{id}")
    public String findOrderById(@PathVariable String id) {
        Order order = new Order();
        order.setId("123");
        order.setPrice(123.321);
        System.out.println("本次请求的服务端口号是：" + ServiceInfoUtil.getPort());
        return order.toString();
    }
}
